A microcontroller is designed to operate at a particular clock frequency or over a range of frequencies. Because the microcontroller may not operate properly at higher frequencies, a microcontroller-based integrated circuit may include some mechanism for detecting an incoming clock signal frequency which is higher than normal and dividing it down to a suitable operating frequency. A typical means for "dividing" the frequency is to regularly skip an incoming clock period. For example, filtering the incoming clock by skipping every other period is effectively dividing the incoming clock by two. The means for detecting and reducing the incoming clock signal is usually referred to as a high frequency filter (HFF). Numerous HFF circuits have been developed to meet the various requirements of individual microcontrollers and the applications in which the microcontrollers will be used.
One microcontroller product which relies on use of an HFF is an integrated circuit for use in a smartcard. Generally, a smartcard is a plastic card, similar in size and shape to a credit-card, which includes a microcontroller-based integrated circuit (IC) with on-chip memory that is embedded within the plastic. Power and data are transmitted to/from the IC either through contacts formed on the card (a contact type card) or using radio frequency signals (a contactless type card). Smartcards are used in electronic purse and credit and debit payment system applications, access control applications (e.g. for pay television and public transportation), and national social service applications, to name a few. Each of these applications require security mechanisms to prevent hackers from being able to gain access to the sensitive information stored in the cards. One security mechanism used in smartcard ICs is the use of a HFF. A hacker can attempt to "break into" the smartcard IC by using a higher than normal input clock frequency. For instance, a smartcard IC may be designed to operate in the range of 5-8 MHz. But a hacker can impose a 10-12 MHz clock signal on the IC in hope that the higher than expected frequency will cause the IC to malfunction and make it easier for the hacker to obtain the desired information. To thwart such an attack, smartcard ICs are designed to include an HFF. With an HFF, a hacker's input clock frequency of 10-12 MHz or even higher is divided down to a suitable operating frequency, e.g. 5-6 MHz, so that the microcontroller operating normally is therefore less susceptible to attack.
However, a disadvantage with the use of an HFF in a smartcard IC, or other IC where security is a concern, is that because the microcontroller only ever sees a suitable clock signal, the microcontroller is not aware if a higher than expected clock frequency is being input and therefore does not know if a high frequency attack is being attempted. Accordingly, it would be advantageous for a microcontroller to be able to determine whether the HFF was operating so that an attempted attack could be detected and the IC guarded against it.